400
|
Can I change the format of date to be shown in the control

With List1
With .Columns
.Add "Default"
With .Add("Format.1")
.ComputedField = "%0"
.FormatColumn = "dateF(value) replace `/` with `-`"
End With
With .Add("Format.2")
.ComputedField = "%0"
.Def(17) = 1
.FormatColumn = "`<b>`+ shortdate(value) + `</b> ` + timeF(value)"
End With
With .Add("Format.3")
.ComputedField = "%0"
.Def(17) = 1
.FormatColumn = "( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `" & _
"Fr`; 6 : `Sa`) )"
End With
End With
With .Items
.Add #1/1/2001 10:00:00 AM#
.Add #1/2/2001 10:00:00 AM#
End With
End With
|
399
|
How can I put a picture on the cell's background (method 3)

With List1
.VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn"
.VisualAppearance.Add 2,"CP:1 0 0 -164 0"
With .Columns
.Add "column"
With .Add("column")
.Alignment = 1
.HeaderAlignment = 1
End With
End With
With .Items
i = .Add()
.SelectableItem(i) = False
.Caption(i,1) = "caption"
.CellBackColor(i,1) = &H2000000
End With
End With
|
398
|
How can I put a picture on the cell's background (method 2)

With List1
.VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn"
With .Columns
.Add "column"
.Add "column"
End With
With .Items
i = .Add()
.SelectableItem(i) = False
.Caption(i,1) = "caption"
.CellBackColor(i,1) = &H1000000
.CellPicture(i,1) = List1.ExecuteTemplate("loadpicture(`c:\exontrol\images\auction.gif`)")
.CellPictureWidth(i,1) = 128
.CellPictureHeight(i,1) = List1.DefaultItemHeight
End With
End With
|
397
|
How can I put a picture on the cell's background (method 1)

With List1
.VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn"
With .Columns
.Add "column"
With .Add("column")
.Alignment = 1
.HeaderAlignment = 1
End With
End With
With .Items
i = .Add()
.SelectableItem(i) = False
.Caption(i,1) = "caption"
.CellBackColor(i,1) = &H1000000
End With
End With
|
396
|
How do I access the cells, or how do I get the values in the columns

With List1
With .Columns
.Add "C1"
.Add "C2"
.Add "C3"
End With
With .Items
h = .Add("Item 1")
.Caption(h,1) = "SubItem 1.1"
.Caption(h,2) = "SubItem 1.2"
Debug.Print( .Caption(h,2) )
End With
End With
|
395
|
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)

With List1
.BeginUpdate
With .ConditionalFormats.Add("1","K1")
.BackColor = RGB(255,0,0)
.ApplyTo = 1 ' &H1
End With
With .ConditionalFormats.Add("1","K2")
.BackColor = RGB(255,0,0)
.ApplyTo = 2 ' &H2
End With
.MarkSearchColumn = False
.DrawGridLines = -2 ' &Hfffffffc Or GridLinesEnum.exVLines
With .Columns
.Add "Column 1"
.Add "Column 2"
.Add "Column 3"
End With
With .Items
.Add
.Add
.Add
End With
.EndUpdate
End With
|
394
|
How can I get the list of items as they are displayed

With List1
.BeginUpdate
.BackColorAlternate = RGB(240,240,240)
.Columns.Add "Names"
With .Items
.Add "Mantel"
.Add "Mechanik"
.Add "Motor"
.Add "Murks"
.Add "Märchen"
.Add "Möhren"
.Add "Mühle"
End With
.Columns.Item(0).SortOrder = 1
.EndUpdate
Debug.Print( .GetItems(1) )
End With
|
393
|
Is posible to reduce the size of the picture to be shown in the column's caption

With List1
.BeginUpdate
.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
.HeaderHeight = 48
.Columns.Add("DefaultSize").HTMLCaption = "Default-Size <img>pic1</img> Picture"
.Columns.Add("CustomSize").HTMLCaption = "Custom-Size <img>pic1:16</img> Picture"
.EndUpdate
End With
|
392
|
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column

With List1
.BeginUpdate
.MarkSearchColumn = False
With .ConditionalFormats.Add("1")
.Bold = True
.ForeColor = RGB(255,0,0)
.ApplyTo = 1 ' &H1
End With
.Columns.Add "C1"
With .Columns.Add("C2")
.HeaderBold = True
.HTMLCaption = "<fgcolor=FF0000>C2"
End With
With .Items
.Caption(.Add(10),1) = 11
.Caption(.Add(12),1) = 13
End With
.EndUpdate
End With
|
391
|
Is it possible to limit the height of item while resizing the row

' AddItem event - Occurs after a new Item is inserted to Items collection.
Private Sub List1_AddItem(ByVal Item As Long)
With List1
.Items.ItemMinHeight(Item) = 18
.Items.ItemMaxHeight(Item) = 72
End With
End Sub
With List1
.BeginUpdate
.ItemsAllowSizing = -1
.ScrollBySingleLine = False
.BackColorAlternate = RGB(240,240,240)
.Columns.Add "Names"
With .Items
.Add "Mantel"
.Add "Mechanik"
.Add "Motor"
.Add "Murks"
.Add "Märchen"
.Add "Möhren"
.Add "Mühle"
End With
.Columns.Item(0).SortOrder = 1
.EndUpdate
End With
|
390
|
Can I specify un-sortable items so they keep their position once the user sorts the columns

With List1
.Columns.Add("Def").SortType = 1
With .Items
.SortableItem(.Add("Unsortable")) = False
.Add 1
.Add 2
.Add 3
End With
End With
|
389
|
The item is not getting selected when clicking the cell's checkbox. What should I do

' CellStateChanged event - Fired after cell's state is changed.
Private Sub List1_CellStateChanged(ByVal ItemIndex As Long,ByVal ColIndex As Long)
With List1
.Items.SelectItem(ItemIndex) = True
End With
End Sub
With List1
.Columns.Add("Check").Def(0) = True
With .Items
.Add 0
.Add 1
.Add 2
.Add 3
End With
End With
|
388
|
Does your control supports multiple lines tooltip

With List1
.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
.ToolTipDelay = 1
.Columns.Add("tootip").ToolTip = "<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, " & _
"icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>"
End With
|
387
|
How can I prevent highlighting the column from the cursor - point

With List1
.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJ" & _
"gEgI="
.Background(32) = &H1000000
.Columns.Add("S").Width = 32
.Columns.Add("Level 1").LevelKey = 1
.Columns.Add("Level 2").LevelKey = 1
.Columns.Add("Level 3").LevelKey = 1
.Columns.Add("E1").Width = 32
.Columns.Add("E2").Width = 32
.Columns.Add("E3").Width = 32
.Columns.Add("E4").Width = 32
End With
|
386
|
Is there any option to show the tooltip programmatically

' MouseMove event - Occurs when the user moves the mouse.
Private Sub List1_MouseMove(ByVal Button As Integer,ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long)
With List1
.ShowToolTip .ItemFromPoint(-1,-1,c,hit),"","8","8"
End With
End Sub
With List1
.BeginUpdate
.Columns.Add "Def"
With .Items
.Add "Item 1"
.Add "Item 2"
.Add "Item 3"
End With
.EndUpdate
End With
|
385
|
Is it possible to prevent covering the colors by selected rows

With List1
.SelBackMode = 1
.BackColorAlternate = RGB(240,240,240)
.Columns.Add "Column"
With .Items
.Add "Item 1"
.Add "Item 2"
.Add "Item 3"
.Add "Item 4"
.Add "Item 5"
End With
End With
|
384
|
Can I use PNG images to display pictures in the control

With List1
.HTMLPicture("pic1") = "c:\exontrol\images\card.png"
.HeaderHeight = 48
.Columns.Add("ColumnName").HTMLCaption = "<b>HTML</b> Column <img>pic1</img> Picture"
End With
|
383
|
Does your control support conditional format and computed fields

With List1
.BeginUpdate
.MarkSearchColumn = False
With .ConditionalFormats
With .Add("%1 >4")
.Bold = True
.StrikeOut = True
.ForeColor = RGB(255,0,0)
.ApplyTo = 1 ' &H1
End With
With .Add("%2 > 4")
.Bold = True
.StrikeOut = True
.ForeColor = RGB(255,0,0)
.ApplyTo = 2 ' &H2
End With
With .Add("%3 > 4")
.Bold = True
.StrikeOut = True
.ForeColor = RGB(255,0,0)
.ApplyTo = 3 ' &H3
End With
End With
With .Columns
.Add "Name"
With .Add("A")
.SortType = 1
.AllowSizing = False
.Width = 36
.FormatColumn = "len(value) ? value + ' +'"
End With
With .Add("B")
.SortType = 1
.AllowSizing = False
.Width = 36
.FormatColumn = "len(value) ? value + ' +'"
End With
With .Add("C")
.SortType = 1
.AllowSizing = False
.Width = 36
.FormatColumn = "len(value) ? value + ' ='"
End With
With .Add("A+B+C")
.SortType = 1
.AllowSizing = False
.Width = 64
.ComputedField = "%1+%2+%3"
.FormatColumn = "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
.Def(17) = 1
End With
End With
With .Items
h1 = .Add("Item 1")
.Caption(h1,1) = 7
.Caption(h1,2) = 3
.Caption(h1,3) = 1
h1 = .Add("Item 2")
.Caption(h1,1) = 2
.Caption(h1,2) = 5
.Caption(h1,3) = 12
h1 = .Add("Item 3")
.Caption(h1,1) = 2
.Caption(h1,2) = 2
.Caption(h1,3) = 4
h1 = .Add("Item 4")
.Caption(h1,1) = 2
.Caption(h1,2) = 9
.Caption(h1,3) = 4
End With
.EndUpdate
End With
|
382
|
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right

With List1
.BeginUpdate
.ScrollBars = 15
With .Columns
.Add "C1"
.Add "C2"
.Add "C3"
.Add "C4"
.Add "C5"
.Add "C6"
.Add "C7"
.Add "C8"
End With
.RightToLeft = True
.EndUpdate
End With
|
381
|
Can I display the cell's check box after the text

With List1
With .Columns.Add("Column")
.Def(0) = True
.Def(34) = "caption,check"
End With
With .Items
.CellHasCheckBox(.Add("Caption 1"),0) = True
.CellHasCheckBox(.Add("Caption 2"),0) = True
End With
End With
|
380
|
Can I change the order of the parts in the cell, as checkbox after the text, and so on

With List1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.Columns.Add("Column").Def(34) = "caption,check,icon,icons,picture"
With .Items
h = .Add("Text")
.CellImage(h,0) = 1
.CellHasCheckBox(h,0) = True
End With
End With
|
379
|
Can I have an image displayed after the text. Can I get that effect without using HTML content

With List1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
.Columns.Add("Column").Def(34) = "caption,icon,check,icons,picture"
With .Items
h = .Add("Text")
.CellImage(h,0) = 1
End With
End With
|
378
|
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right

With List1
.BeginUpdate
.ScrollBars = 15
With .Columns
.Add "C1"
.Add "C2"
.Add "C3"
.Add "C4"
.Add "C5"
.Add "C6"
.Add "C7"
.Add "C8"
End With
.RightToLeft = True
.EndUpdate
End With
|
377
|
How can I change the foreground color for a particular column

With List1
With .Columns
.Add "Column 1"
.Add("Column 2").Def(8) = 8439039
.Add "Column 3"
End With
End With
|
376
|
How can I change the background color for a particular column

With List1
With .Columns
.Add "Column 1"
.Add("Column 2").Def(7) = 8439039
.Add "Column 3"
End With
End With
|
375
|
How can I display the column using currency format and enlarge the font for certain values

With List1
With .Columns.Add("Currency")
.Def(17) = 1
.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
End With
With .Items
.Add "1.23"
.Add "2.34"
.Add "9.94"
.Add "11.94"
.Add "1000"
End With
End With
|
374
|
How can I highlight only parts of the cells

With List1
With .Columns.Add("")
.Def(17) = 1
.FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"
End With
With .Items
h = .Add("Root")
.Add "Child 1"
.Add "Child 2"
.Add "Child 3"
End With
End With
|
373
|
How can I get the number of occurrences of a specified string in the cell

With List1
.Columns.Add ""
With .Columns.Add("occurrences")
.ComputedField = "lower(%0) count 'o'"
.FormatColumn = "'contains ' + value + ' of \'o\' chars'"
End With
With .Items
h = .Add("Root")
.Add "Child 1 oooof the root"
.Add "Child 2"
.Add "Child 3"
End With
End With
|
372
|
How can I display dates in my format

With List1
With .Columns.Add("Date")
.Def(17) = 1
.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
End With
With .Items
.Add #1/21/2001#
.Add #2/22/2002#
.Add #3/13/2003#
.Add #4/24/2004#
End With
End With
|
371
|
How can I display dates in short format

With List1
.Columns.Add("Date").FormatColumn = "shortdate(value)"
With .Items
.Add #1/1/2001#
.Add #2/2/2002#
.Add #3/3/2003#
.Add #4/4/2004#
End With
End With
|
370
|
How can I display dates in long format

With List1
.Columns.Add("Date").FormatColumn = "longdate(value)"
With .Items
.Add #1/1/2001#
.Add #2/2/2002#
.Add #3/3/2003#
.Add #4/4/2004#
End With
End With
|
369
|
How can I display only the right part of the cell

With List1
.Columns.Add ""
With .Columns.Add("Right")
.ComputedField = "%0 right 2"
.FormatColumn = "'""' + value + '""'"
End With
With .Items
h = .Add("Root")
.Add "Child 1"
.Add "Child 2"
.Add "SChild 3"
End With
End With
|
368
|
How can I display only the left part of the cell

With List1
.Columns.Add ""
.Columns.Add("Left").ComputedField = "%0 left 2"
With .Items
h = .Add("Root")
.Add "Child 1"
.Add "Child 2"
.Add "SChild 3"
End With
End With
|
367
|
How can I display true or false instead 0 and -1

With List1
.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'"
With .Items
.Add True
.Add False
.Add True
.Add 0
.Add 1
End With
End With
|
366
|
How can I display icons or images instead numbers

With List1
.Images "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="
With .Columns.Add("Icons")
.Def(17) = 1
.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value"
End With
With .Items
.Add 1
.Add 2
.Add 3
End With
End With
|
365
|
How can I display the column using currency

With List1
.Columns.Add("Currency").FormatColumn = "currency(dbl(value))"
With .Items
.Add "1.23"
.Add "2.34"
.Add "0"
.Add 5
.Add "10000.99"
End With
End With
|
364
|
Is is possible to use HTML tags to display in the filter caption

With List1
.BeginUpdate
.FilterBarPromptVisible = True ' True
.FilterBarCaption = "This is a bit of text being displayed in the filter bar."
.Columns.Add ""
With .Items
.Add "Item 1"
.Add "Item 2"
.Add "Item 3"
End With
.EndUpdate
End With
|
363
|
How can I find the number of items after filtering
With List1
.BeginUpdate
.Columns.Add ""
With .Items
h = .Add("")
.Caption(h,0) = .VisibleItemCount
End With
.EndUpdate
End With
|
362
|
How can I change the filter caption

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 12801 ' FilterPromptEnum.exFilterPromptWords Or FilterPromptEnum.exFilterPromptContainsAll
.FilterBarPromptPattern = "london robert"
.FilterBarCaption = "<r>Found: ... "
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
361
|
While using the filter prompt is it is possible to use wild characters

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 16
.FilterBarPromptPattern = "lon* seat*"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
360
|
How can I list all items that contains any of specified words, not necessary at the beggining

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 4610 ' FilterPromptEnum.exFilterPromptStartWords Or FilterPromptEnum.exFilterPromptContainsAny
.FilterBarPromptPattern = "london davolio"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
359
|
How can I list all items that contains any of specified words, not strings

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 12802 ' FilterPromptEnum.exFilterPromptWords Or FilterPromptEnum.exFilterPromptContainsAny
.FilterBarPromptPattern = "london nancy"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
358
|
How can I list all items that contains all specified words, not strings

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 12801 ' FilterPromptEnum.exFilterPromptWords Or FilterPromptEnum.exFilterPromptContainsAll
.FilterBarPromptPattern = "london robert"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
357
|
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 258 ' FilterPromptEnum.exFilterPromptCaseSensitive Or FilterPromptEnum.exFilterPromptContainsAny
.FilterBarPromptPattern = "Anne"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
356
|
Is it possible to list only items that ends with any of specified strings

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 4
.FilterBarPromptColumns = "0"
.FilterBarPromptPattern = "Fuller"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
355
|
Is it possible to list only items that ends with any of specified strings

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 4
.FilterBarPromptColumns = "0"
.FilterBarPromptPattern = "Fuller"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
354
|
Is it possible to list only items that starts with any of specified strings

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 3
.FilterBarPromptColumns = "0"
.FilterBarPromptPattern = "An M"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
353
|
Is it possible to list only items that starts with specified string

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 3
.FilterBarPromptColumns = "0"
.FilterBarPromptPattern = "A"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
352
|
How can I specify that the list should include any of the seqeunces in the pattern

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 2
.FilterBarPromptPattern = "london seattle"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
351
|
How can I specify that all sequences in the filter pattern must be included in the list

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptType = 1
.FilterBarPromptPattern = "london manager"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
350
|
How do I change at runtime the filter prompt

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptPattern = "london manager"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
349
|
How do I specify to filter only a single column when using the filter prompt

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPromptColumns = "2,3"
.FilterBarPromptPattern = "london"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
348
|
How do I change the prompt or the caption being displayed in the filter bar

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
.FilterBarPrompt = "changed"
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
.EndUpdate
End With
|
347
|
How do I enable the filter prompt feature

With List1
.BeginUpdate
.ColumnAutoResize = True
.ContinueColumnScroll = 0
.MarkSearchColumn = False
.SearchColumnIndex = 1
.FilterBarPromptVisible = True ' True
With .Columns
.Add("Name").Width = 96
.Add("Title").Width = 96
.Add "City"
End With
With .Items
h0 = .Add("Nancy Davolio")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Seattle"
h0 = .Add("Andrew Fuller")
.Caption(h0,1) = "Vice President, Sales"
.Caption(h0,2) = "Tacoma"
.SelectItem(h0) = True
h0 = .Add("Janet Leverling")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Kirkland"
h0 = .Add("Margaret Peacock")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "Redmond"
h0 = .Add("Steven Buchanan")
.Caption(h0,1) = "Sales Manager"
.Caption(h0,2) = "London"
h0 = .Add("Michael Suyama")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Robert King")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
h0 = .Add("Laura Callahan")
.Caption(h0,1) = "Inside Sales Coordinator"
.Caption(h0,2) = "Seattle"
h0 = .Add("Anne Dodsworth")
.Caption(h0,1) = "Sales Representative"
.Caption(h0,2) = "London"
End With
.EndUpdate
End With
|
346
|
Is it possible to change the style for the vertical or horizontal grid lines, in the list area

With List1
.BeginUpdate
.DrawGridLines = -1
.GridLineStyle = 33 ' GridLinesStyleEnum.exGridLinesVSolid Or GridLinesStyleEnum.exGridLinesHDot4
.Columns.Add "C1"
.Columns.Add "C2"
.Columns.Add "C3"
With .Items
h = .Add("Item 1")
.Caption(h,1) = "SubItem 1.2"
.Caption(h,2) = "SubItem 1.3"
h = .Add("Item 2")
.Caption(h,1) = "SubItem 2.2"
.Caption(h,2) = "SubItem 2.3"
End With
.EndUpdate
End With
|
345
|
Is it possible to change the style for the grid lines, for instance to be solid not dotted

With List1
.BeginUpdate
.DrawGridLines = -1
.GridLineStyle = 48
.Columns.Add "Column"
.EndUpdate
End With
|
344
|
How can I filter programatically using more columns

With List1
.BeginUpdate
.MarkSearchColumn = False
With .Columns
.Add "Car"
.Add "Equipment"
End With
With .Items
.Caption(.Add("Mazda"),1) = "Air Bag"
.Caption(.Add("Toyota"),1) = "Air Bag,Air condition"
.Caption(.Add("Ford"),1) = "Air condition"
.Caption(.Add("Nissan"),1) = "Air Bag,ABS,ESP"
.Caption(.Add("Mazda"),1) = "Air Bag, ABS,ESP"
.Caption(.Add("Mazda"),1) = "ABS,ESP"
End With
With .Columns.Item("Car")
.FilterType = 240
.Filter = "Mazda"
End With
With .Columns.Item("Equipment")
.FilterType = 3
.Filter = "*ABS*|*ESP*"
End With
.ApplyFilter
.EndUpdate
End With
|
343
|
How do I find an item based on my extra data

With List1
.Columns.Add "Default"
With .Items
.Add "Item 1"
.Add "Item 2"
.ItemData(.Add("Item 3")) = 1234
.Add "Item 4"
.ItemBold(.FindItemData(1234)) = True
End With
End With
|
342
|
How do I print the control's content

With List1
.BeginUpdate
.Columns.Add "Number"
.Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''"
With .Items
.Add "1.23"
.Add "2.34"
.Add "0"
.ItemBackColor(.Add()) = RGB(255,128,128)
.Add "10000.99"
End With
.EndUpdate
With CreateObject("Exontrol.Print")
.PrintExt = List1.Object
.Preview
End With
End With
|
341
|
How can I display the currency only for not empty cells
With List1
.Columns.Add "Number"
.Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''"
With .Items
.Add "1.23"
.Add "2.34"
.Add "0"
.ItemBackColor(.Add()) = RGB(255,128,128)
.Add "10000.99"
End With
End With
|
340
|
Is there a function to display the number of days between two date including the number of hours

With List1
.Columns.Add("Start").Width = 32
.Columns.Add "End"
.Columns.Add("Duration").ComputedField = "2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? ' and ' : " & _
"'') + =:3 + ' hour(s)' : '' )"
With .Items
h = .Add(#1/11/2001#)
.Caption(h,1) = #1/14/2001#
h = .Add(#2/22/2002 0:00:00 PM#)
.Caption(h,1) = #3/14/2002 1:00:00 PM#
h = .Add(#3/13/2003#)
.Caption(h,1) = #4/11/2003 11:00:00 AM#
End With
End With
|
339
|
Is there a function to display the number of days between two date including the number of hours

With List1
.Columns.Add "Start"
.Columns.Add "End"
.Columns.Add("Duration").ComputedField = """D "" + int(date(%1)-date(%0)) + "" H "" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))"
With .Items
h = .Add(#1/11/2001#)
.Caption(h,1) = #1/14/2001 11:00:00 PM#
h = .Add(#2/22/2002 0:00:00 PM#)
.Caption(h,1) = #3/14/2002 1:00:00 PM#
h = .Add(#3/13/2003#)
.Caption(h,1) = #4/11/2003 11:00:00 AM#
End With
End With
|
338
|
How can I display the number of days between two dates

With List1
.Columns.Add "Start"
.Columns.Add "End"
.Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'"
With .Items
h = .Add(#1/11/2001#)
.Caption(h,1) = #1/14/2001#
h = .Add(#2/22/2002#)
.Caption(h,1) = #3/14/2002#
h = .Add(#3/13/2003#)
.Caption(h,1) = #4/11/2003#
End With
End With
|
337
|
How can I get second part of the date

With List1
.Columns.Add "Date"
.Columns.Add("Second").ComputedField = "sec(date(%0))"
With .Items
.Add #1/11/2001 10:10:00 AM#
.Add #2/22/2002 11:01:22 AM#
.Add #3/13/2003 0:23:01 PM#
.Add #4/14/2004 1:11:59 PM#
End With
End With
|
336
|
How can I get minute part of the date

With List1
.Columns.Add "Date"
.Columns.Add("Minute").ComputedField = "min(date(%0))"
With .Items
.Add #1/11/2001 10:10:00 AM#
.Add #2/22/2002 11:01:00 AM#
.Add #3/13/2003 0:23:00 PM#
.Add #4/14/2004 1:11:00 PM#
End With
End With
|
335
|
How can I check the hour part only so I know it was afternoon

With List1
.ConditionalFormats.Add("hour(%0)>=12").Bold = True
.Columns.Add "Date"
.Columns.Add("Hour").ComputedField = "hour(%0)"
With .Items
.Add #1/11/2001 10:00:00 AM#
.Add #2/22/2002 11:00:00 AM#
.Add #3/13/2003 0:00:00 PM#
.Add #4/14/2004 1:00:00 PM#
End With
End With
|
334
|
What about a function to get the day in the week, or days since Sunday

With List1
.Columns.Add "Date"
.Columns.Add("WeekDay").ComputedField = "weekday(%0)"
With .Items
.Add #1/11/2001 10:00:00 AM#
.Add #2/22/2002 11:00:00 AM#
.Add #3/13/2003 0:00:00 PM#
.Add #4/14/2004 1:00:00 PM#
End With
End With
|
333
|
Is there any function to get the day of the year or number of days since January 1st

With List1
.Columns.Add "Date"
.Columns.Add("Day since January 1st").ComputedField = "yearday(%0)"
With .Items
.Add #1/11/2001 10:00:00 AM#
.Add #2/22/2002 11:00:00 AM#
.Add #3/13/2003 0:00:00 PM#
.Add #4/14/2004 1:00:00 PM#
End With
End With
|
332
|
How can I display only the day of the date

With List1
.Columns.Add "Date"
.Columns.Add("Day").ComputedField = "day(%0)"
With .Items
.Add #1/11/2001 10:00:00 AM#
.Add #2/22/2002 11:00:00 AM#
.Add #3/13/2003 0:00:00 PM#
.Add #4/14/2004 1:00:00 PM#
End With
End With
|
331
|
How can I display only the month of the date

With List1
.Columns.Add "Date"
.Columns.Add("Month").ComputedField = "month(%0)"
With .Items
.Add #1/1/2001 10:00:00 AM#
.Add #2/2/2002 11:00:00 AM#
.Add #3/3/2003 0:00:00 PM#
.Add #4/4/2004 1:00:00 PM#
End With
End With
|
330
|
How can I get only the year part from a date expression

With List1
.Columns.Add "Date"
.Columns.Add("Year").ComputedField = "year(%0)"
With .Items
.Add #1/1/2001 10:00:00 AM#
.Add #2/2/2002 11:00:00 AM#
.Add #3/3/2003 0:00:00 PM#
.Add #4/4/2004 1:00:00 PM#
End With
End With
|
329
|
Can I convert the expression to date

With List1
.Columns.Add "Number"
.Columns.Add("Date").ComputedField = "date(dbl(%0))"
With .Items
.Add "-1.98"
.Add "30000.99"
.Add "3561.23"
.Add "1232.34"
End With
End With
|
328
|
Can I convert the expression to a number, double or float

With List1
.Columns.Add "Number"
.Columns.Add("Number + 2").ComputedField = "dbl(%0)+2"
With .Items
.Add "-1.98"
.Add "0.99"
.Add "1.23"
.Add "2.34"
End With
End With
|
327
|
How can I display dates in long format

With List1
.Columns.Add "Date"
.Columns.Add("LongFormat").ComputedField = "longdate(%0)"
With .Items
.Add #1/1/2001 10:00:00 AM#
.Add #2/2/2002 11:00:00 AM#
.Add #3/3/2003 0:00:00 PM#
.Add #4/4/2004 1:00:00 PM#
End With
End With
|
326
|
How can I display dates in short format

With List1
.Columns.Add "Date"
.Columns.Add("ShortFormat").ComputedField = "shortdate(%0)"
With .Items
.Add #1/1/2001 10:00:00 AM#
.Add #2/2/2002 11:00:00 AM#
.Add #3/3/2003 0:00:00 PM#
.Add #4/4/2004 1:00:00 PM#
End With
End With
|
325
|
How can I display the time only of a date expression

With List1
.Columns.Add "Date"
.Columns.Add("Time").ComputedField = "'time is:' + time(date(%0))"
With .Items
.Add #1/1/2001 10:00:00 AM#
.Add #2/2/2002 11:00:00 AM#
.Add #3/3/2003 0:00:00 PM#
.Add #4/4/2004 1:00:00 PM#
End With
End With
|
324
|
Is there any function to display currencies, or money formatted as in the control panel

With List1
.Columns.Add "Number"
.Columns.Add("Currency").ComputedField = "currency(dbl(%0))"
With .Items
.Add "1.23"
.Add "2.34"
.Add "10000.99"
End With
End With
|
323
|
How can I convert the expression to a string so I can look into the date string expression for month's name

With List1
.Columns.Add "Number"
.Columns.Add("Str").ComputedField = "str(%0) + ' AA'"
With .Items
.Add "-1.98"
.Add "0.99"
.Add "1.23"
.Add "2.34"
End With
End With
|
322
|
Can I display the absolute value or positive part of the number

With List1
.Columns.Add "Number"
.Columns.Add("Abs").ComputedField = "abs(%0)"
With .Items
.Add "-1.98"
.Add "0.99"
.Add "1.23"
.Add "2.34"
End With
End With
|
321
|
Is there any function to get largest number with no fraction part that is not greater than the value

With List1
.Columns.Add "Number"
.Columns.Add("Floor").ComputedField = "floor(%0)"
With .Items
.Add "-1.98"
.Add "0.99"
.Add "1.23"
.Add "2.34"
End With
End With
|
320
|
Is there any function to round the values base on the .5 value

With List1
.Columns.Add "Number"
.Columns.Add("Round").ComputedField = "round(%0)"
With .Items
.Add "-1.98"
.Add "0.99"
.Add "1.23"
.Add "2.34"
End With
End With
|
319
|
How can I get or display the integer part of the cell

With List1
.Columns.Add "Number"
.Columns.Add("Int").ComputedField = "int(%0)"
With .Items
.Add "-1.98"
.Add "0.99"
.Add "1.23"
.Add "2.34"
End With
End With
|
318
|
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

With List1
.Columns.Add("").ComputedField = "proper(%0)"
With .Items
h = .Add("Item 1")
.Add "item item"
.Add "item item"
.Add "item item"
End With
End With
|
317
|
Is there any option to display cells in uppercase

With List1
.Columns.Add("").ComputedField = "upper(%0)"
With .Items
h = .Add("Item 1")
.Add "Item 2"
.Add "Item 3"
.Add "Item 4 - child"
End With
End With
|
316
|
Is there any option to display cells in lowercase

With List1
.Columns.Add("").ComputedField = "lower(%0)"
With .Items
h = .Add("Item 1")
.Add "Item 2"
.Add "Item 3"
.Add "Item 4 - child"
End With
End With
|
315
|
How can I mark the cells that has a specified type, ie strings only

With List1
.ConditionalFormats.Add("type(%0) = 8").ForeColor = RGB(255,0,0)
.Columns.Add ""
With .Items
h = .Add("Item 1")
.Add "Item 2"
.Add 2
.Add "Item 4 - child"
End With
End With
|
314
|
How can I bold the items that contains data or those who displays empty strings

With List1
.ConditionalFormats.Add("not len(%1)=0").Bold = True
.Columns.Add "C1"
.Columns.Add "C2"
With .Items
h = .Add("Item 1")
.Add "Item 2"
hC = .Add("Item 3")
.Caption(hC,1) = "1"
.Add "Item 3"
End With
End With
|
313
|
Can I change the background color for items or cells that contains a specified string

With List1
.ConditionalFormats.Add("%0 contains 'hi'").BackColor = RGB(255,0,0)
.Columns.Add ""
With .Items
.Add "Item 1"
.Add "Item 2"
.Add "Item 3"
.Add "Item 4 - child"
End With
End With
|
312
|
Is there any option to change the fore color for cells or items that ends with a specified string

With List1
.ConditionalFormats.Add("%0 endwith '22'").ForeColor = RGB(255,0,0)
.Columns.Add ""
With .Items
.Add "Item 1"
.Add "Item 2"
.Add "Item 1.22"
.Add "Item 2.22"
End With
End With
|
311
|
How can I highlight the cells or items that starts with a specified string

With List1
.ConditionalFormats.Add("%0 startwith 'C'").Underline = True
.Columns.Add ""
With .Items
.Add "Item 1"
.Add "CItem 2"
.Add "Item 3"
.Add "Item 4"
End With
End With
|
310
|
How can I change the foreground color for a particular column

With List1
With .Columns
.Add "Column 1"
.Add("Column 2").Def(8) = 8439039
.Add "Column 3"
End With
End With
|
309
|
How can I change the background color for a particular column

With List1
With .Columns
.Add "Column 1"
.Add("Column 2").Def(7) = 8439039
.Add "Column 3"
End With
End With
|
308
|
How can I display the column's header using multiple lines

With List1
.HeaderHeight = 128
.HeaderSingleLine = False
.Columns.Add("This is just a column that should break the header.").Width = 32
.Columns.Add "This is just another column that should break the header."
End With
|
307
|
How can I align the text/caption on the scroll bar

With List1
.ScrollPartCaption(1,512) = "left"
.ScrollPartCaptionAlignment(1,512) = 0
.ScrollPartCaption(1,128) = "right"
.ScrollPartCaptionAlignment(1,128) = 2
.ColumnAutoResize = False
.Columns.Add 1
.Columns.Add 2
.Columns.Add 3
.Columns.Add 4
.Columns.Add 5
.Columns.Add 6
End With
|
306
|
How do I select the next row/item

With List1
.Columns.Add "Column"
With .Items
.Add "Item 1"
.Add "Item 2"
.Add "Item 3"
.SelectItem(.NextVisibleItem(.FocusItem)) = True
End With
End With
|
305
|
How do I enable resizing ( changing the height ) the items at runtime

With List1
.ItemsAllowSizing = -1
.DrawGridLines = 1
.ScrollBySingleLine = True
.Columns.Add "Column"
.Items.Add "Item 1"
With .Items
.ItemHeight(.Add("Item 2")) = 48
End With
.Items.Add "Item 3"
.Items.Add "Item 4"
End With
|
304
|
How do I enable resizing all the items at runtime

With List1
.ItemsAllowSizing = 1
.DrawGridLines = 1
.Columns.Add "Column"
.Items.Add "Item 1"
With .Items
.ItemHeight(.Add("Item 2")) = 48
End With
.Items.Add "Item 3"
End With
|
303
|
How can I remove the filter

With List1
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = 1
End With
.ApplyFilter
.ClearFilter
End With
|
302
|
How do I change the control's border, using your EBN files

With List1
.VisualAppearance.Add 1,"c:\exontrol\images\normal.ebn"
.Appearance = 16777216 ' &H1000000
End With
|
301
|
Can I change the style for break or divider line

With List1
.Columns.Add "Default"
With .Items
.Add "Item 1"
h = .Add()
.ItemBreak(h) = 2
.SelectableItem(h) = False
.Add "Item 3"
End With
End With
|